{extend name="pub/base2" /}
{block name="title"}
<title>付费批量设置</title>
{/block}

{block name="body"}
<article class="clearfix pd-20">
    <form method="post" class="form form-horizontal">
        <div class="row clearfix">
            <label class="form-label col-xs-4 col-sm-3"><span class="c-red">*</span>起始章节：</label>
            <div class="formControls col-xs-8 col-sm-9">
                <input type="text" class="input-text" value="" name="start_pay">
            </div>
        </div>

        <div class="row clearfix">
            <label class="form-label col-xs-4 col-sm-3"><span class="c-red">*</span>价格：</label>
            <div class="formControls col-xs-8 col-sm-9">
                <input type="text" class="input-text" value="" name="money">
            </div>
        </div>

        <div class="row clearfix">
            <label class="form-label col-xs-4 col-sm-3"><span class="c-red">*</span>起始漫画ID：</label>
            <div class="formControls col-xs-8 col-sm-9">
                <input type="text" class="input-text" value="-1" name="start_id">
            </div>
        </div>

        <div class="row clearfix">
            <label class="form-label col-xs-4 col-sm-3">地区：</label>
            <div class="formControls col-xs-8 col-sm-9">
                <span class="select-box" style="width:150px;">
                    <select class="select" name="area_id" size="1">
                        <option value="-1">请选择</option>
                        {volist name="areas" id="vo"}
                        <option value="{$vo.id}">{$vo.area_name}</option>
                        {/volist}
                    </select>
				</span>
            </div>
        </div>

        <div class="row cl">
            <div class="col-xs-8 col-sm-9 col-xs-offset-4 col-sm-offset-3">
                <input class="btn btn-primary radius" type="submit" value="&nbsp;&nbsp;提交&nbsp;&nbsp;">
            </div>
        </div>
    </form>
</article>
{/block}
{block name="script"}
<!--请在下方写此页面业务相关的脚本-->
<script type="text/javascript">
    $(function () {
        $("form").validate({
            rules: {
                start_pay: {
                    required: true,
                    digits: true
                },
                money: {
                    required: true,
                    number: true
                },
                start_id:{
                    required: true,
                    number: true
                },
                area_id:{
                    required: true,
                    number: true
                }
            },
            onkeyup: false,
            focusCleanup: false,
            submitHandler: function(form) {
                $.ajax({
                    url:"{:url('payment')}",
                    type:'post',
                    data:$('form').serialize(),
                    success(res) {
                        subResHandle(res)
                    }
                })
            }
        });
    });
</script>
<!--/请在上方写此页面业务相关的脚本-->
{/block}